package com.yys.gulimall.product.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.yys.common.utils.PageUtils;
import com.yys.gulimall.product.entity.AttrEntity;
import com.yys.gulimall.product.entity.ProductAttrValueEntity;
import com.yys.gulimall.product.vo.AttrGroupRelationVo;
import com.yys.gulimall.product.vo.AttrRespAo;
import com.yys.gulimall.product.vo.AttrVo;

import java.util.List;
import java.util.Map;

/**
 * 商品属性
 *
 * @author zqcc
 * @email zhang32194878@163.com
 * @date 2021-02-21 01:58:10
 */
public interface AttrService extends IService<AttrEntity> {

    PageUtils queryPage(Map<String, Object> params);

    void saveAttr(AttrVo attr);

    PageUtils queryBaseAttrPage(Map<String, Object> params, Long catelogId, String attrType);

    AttrRespAo getAttrInfo(Long attrId);

    void updateAttr(AttrVo attr);

    List<AttrEntity> getRelationAttr(Long attrgroupId);

    void deleteRelation(AttrGroupRelationVo... vos);

    PageUtils getNoRelationAttr(String attrgroupId, Map<String, Object> params);

    /**
     * 根据attrIds挑出可检索的attrId
     * */
    List<Long> getSearchAttrs(List<Long> attrIds);
}

